<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/sys/menu/";  //应用的地址名 
%>
<html>
  <head>
    <base href="<%=basePath%>"></base>
    <title><%=com.ce.util.RegeditUtil.getRegeditStringValue("SYSTEM_SEG_NAME") %></title>
    
<script type="text/javascript">

     $(function(){
		    $('#MenuRoleFrame').layout();
               //初始化工作，因为远程载入该界面时无法通过在标签中进行设置相应的验证属性等信息，必须要在这里进行初始化
			$('#MenuRoleTree').tree({
				url:'<%=basePath%>SysMenu_searchMenuJsonTree.action',  //获取json格式的节点树
				//打开节点时的操作
			    onClick:function (node){ 
			                  if($('#MenuRoleTree').tree('isLeaf',node.target)){
					               	//将选中的菜单id值放入人员的datagrid，然后重新载入 	               
						            var queryParams = $('#searchTable').datagrid("options").queryParams;  
						            queryParams['search.menuId']=node.id;//赋值查询参数值 
									$('#searchTable').datagrid('reload');	
			               	  }   
			            },
			    //加载数据失败的处理        
			    onLoadError: function () {    
	                $.messager.alert('消息提示','菜单树加载失败，请稍后再试！','error'); 
	            }                 
		      });   
		    $("#menuManager").load("<%=path%>/sys/role/SysRoleUserMenu.action");
         }); 
         
 
</script>

  </head>  
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
<div id="MenuRoleFrame" class="easyui-layout" style="width:100%;height:100%;">
  <div  region="west" split="true" style="width: 200px;"><ul id="MenuRoleTree"></ul></div>
  <div region="center" id="menuManager"   style="overflow:hidden;" >
  </div>
  </div>
</div>

</body>
</html>